//
//  HttpManagerCenter+Guard.m
//  Yihubang
//
//  Created by hyu on 16/8/10.
//  Copyright © 2016年 jinghao. All rights reserved.
//

#import "HttpManagerCenter+Guard.h"

@implementation HttpManagerCenter (Guard)

//开启一键呼救接口
- (RACSignal*)wantHelpWithresultClass:(Class)resultClass{
    NSMutableDictionary *params = [NSMutableDictionary new];
    return [self doRacPost:@"c=iprotect&a=emergency" parameters:params resultClass:resultClass];
}

//更新一键呼救接口
- (RACSignal*)updtateHelp:(NSMutableDictionary *)emergency_dic resultClass:(Class)resultClass{
    return [self doRacPost:@"c=iprotect&a=update_emergency" parameters:emergency_dic resultClass:resultClass];
}

//一键呼救详情接口
- (RACSignal*)getHelpInfo:(NSString *)help_id resultClass:(Class)resultClass{
    NSMutableDictionary *params = [NSMutableDictionary new];
    [params setObjectNotNull:help_id forKey:@"id"];
    return [self doRacPost:@"c=iprotect&a=get_emergency_info" parameters:params resultClass:resultClass];
}

//获取一键呼救紧急联系人接口
- (RACSignal*)getSbContractInfo:(NSString *)help_id resultClass:(Class)resultClass{
    NSMutableDictionary *params = [NSMutableDictionary new];
    [params setObjectNotNull:help_id forKey:@"id"];
    return [self doRacPost:@"c=iprotect&a=get_emergency_contact" parameters:params resultClass:resultClass];
}

//获取一键呼救录音接口
- (RACSignal*)getVoiceUrl:(NSString *)voice_id resultClass:(Class)resultClass{
    NSMutableDictionary *params = [NSMutableDictionary new];
    [params setObjectNotNull:voice_id forKey:@"id"];
    return [self doRacPost:@"c=iprotect&a=get_emergency_voice" parameters:params resultClass:resultClass];
}
@end
